package com.one.rope.mvp.web.common.dto.admin.company;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.one.rope.mvp.web.common.dto.admin.partner.AdminCompanyPartnerListVO;
import com.one.rope.mvp.web.common.dto.admin.project.AdminCompanyProjectListVO;
import com.one.rope.mvp.web.common.dto.admin.team.AdminCompanyMemberListVO;
import com.one.rope.mvp.web.common.enums.CompanyFinanceStageEnum;
import com.one.rope.mvp.web.common.enums.CurrenyTypeEnum;
import com.one.rope.mvp.web.common.enums.MemberScaleEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.List;

/**
 * @author Weijian.Liu
 * @desc 企业详情返回对象
 * @date 2020/2/20 12:20
 */
@Data
@ApiModel
public class AdminCompanyDetailVO {

  @ApiModelProperty(value = "企业id")
  private Long id;

  @ApiModelProperty(value = "企业名称")
  private String name;

  @ApiModelProperty(value = "融资阶段\n" +
      "1：种子轮\n"
      + "2：天使轮 \n"
      + "3：A轮\n"
      + "4：B轮 \n"
      + "5：C轮 \n"
      + "6：D轮 \n"
      + "7：D轮以上 \n"
      + "8：IPO计划 \n"
      + "9：已上市")
  @JsonProperty("finance_stage")
  private Integer financeStage;

  @ApiModelProperty(value = "融资阶段")
  @JsonProperty("finance_stage_str")
  private String financeStageStr;

  @ApiModelProperty(value = "成员规模\n" +
      "1：1-10人\n" +
      "2：10-50人 \n" +
      "3：50-100人 \n" +
      "4：100人以上")
  @JsonProperty("member_scale")
  private Integer memberScale;

  @ApiModelProperty(value = "成员规模名称")
  @JsonProperty("member_scale_str")
  private String memberScaleStr;

  @ApiModelProperty(value = "公司估值")
  @JsonProperty("company_value")
  private Integer companyValue;

  @ApiModelProperty(value = "币种\n"
      + "(1：人名币\n"
      + " 2：美元)")
  @JsonProperty("value_currency")
  private Integer valueCurrency;

  @ApiModelProperty(value = "币种")
  @JsonProperty("value_currency_str")
  private String valueCurrencyStr;


  @ApiModelProperty(value = "评估机构")
  @JsonProperty("valuation_org")
  private String valuationOrg;

  @ApiModelProperty(value = "企业创建用户")
  @JsonProperty("create_user")
  private CompanyCreateUserVO createUser;

  @ApiModelProperty(value = "项目列表")
  @JsonProperty("project_list")
  private List<AdminCompanyProjectListVO> projectList;

  @ApiModelProperty(value = "合伙人列表")
  @JsonProperty("partner_list")
  private List<AdminCompanyPartnerListVO> partnerList;

  @ApiModelProperty(value = "团队成员列表")
  @JsonProperty("member_list")
  private List<AdminCompanyMemberListVO> memberList;

  public String getFinanceStageStr() {
    if (null != financeStage) {
      return CompanyFinanceStageEnum.getName(financeStage);
    }
    return "";
  }

  public String getMemberScaleStr() {
    if (null != memberScale) {
      return MemberScaleEnum.getName(memberScale);
    }
    return "";
  }

  public String getValueCurrencyStr() {
    if (null != valueCurrency) {
      return CurrenyTypeEnum.getName(valueCurrency);
    }
    return "";
  }
}
